package com.kaiwukj.android.ufamily.mvp.http.api.service;

import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseListResp;
import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseObjResp;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.KeeperOrderResult;
import com.kaiwukj.android.ufamily.mvp.http.entity.result.KeeperResult;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface KeeperService {


    @GET("/admin/app/housekeeper/listHousekeeper")
    Observable<BaseObjResp<List<KeeperResult>>> fetchCommunityKeeperList();

    @GET("/admin/app/housekeeper/getSysHouseKeeper")
    Observable<BaseObjResp<List<KeeperResult>>> fetchSysKeeperResult();


    /**
     * @param body (housekeeperId phone serviceCode)填一个
     * @return
     */
    @POST("/admin/app/housekeeper/bindHousekeeper")
    Observable<BaseObjResp<Integer>> bindKeeper(@Body RequestBody body);


    @GET("/admin/app/housekeeper/getUserHousekeeper")
    Observable<BaseObjResp<KeeperResult>> getMyKeeper();

    @GET("/order/app/housekeeperOrder/page")
    Observable<BaseListResp<KeeperOrderResult>> fetchKeeperOrder(@Query("page") Integer page,
                                                                 @Query("pageSize") Integer pageSize);


    @POST("/admin/app/houseKeeperComplain/addComplain")
    Observable<BaseObjResp<Integer>> addComplain(@Query("complainContent") String content,
                                                 @Query("houseKeeperAccountId") Integer keeperId);

    @POST("/order/app/housekeeperOrder/addHousekeeperOrder")
    Observable<BaseObjResp<Integer>> addKeeperOrder(@Body RequestBody body);


}
